#ifndef __INNER_APIDEF_MEM_H_
#define __INNER_APIDEF_MEM_H_

#include "typedef.h"

/**
 * @brief initialize a first-fit managed buffer
 *
 * @param start the start address of the buffer
 * @param size the size of the buffer
 */
void init_ff_alloc(address start, int size);

/**
 * @brief request a memory block via first-fit
 * 
 * @param size
 * @return void* null if request gets failed 
 */
void *ff_alloc(int size) __attribute__((malloc));

/**
 * @brief release the requested memory block
 *
 * @param ptr 
 */
void ff_free(void *ptr);


#endif//__INNER_APIDEF_MEM_H_